import request from '@/utils/request'

// 查询编码规则列表
export function listCoderule(query) {
  return request({
    url: '/system/coderule/list',
    method: 'get',
    params: query
  })
}

// 查询编码规则详细
export function getCoderule(bdCrcode) {
  return request({
    url: '/system/coderule/' + bdCrcode,
    method: 'get'
  })
}

// 新增编码规则
export function addCoderule(data) {
  return request({
    url: '/system/coderule',
    method: 'post',
    data: data
  })
}

// 修改编码规则
export function updateCoderule(data) {
  return request({
    url: '/system/coderule',
    method: 'put',
    data: data
  })
}

// 删除编码规则
export function delCoderule(bdCrcode) {
  return request({
    url: '/system/coderule/' + bdCrcode,
    method: 'delete'
  })
}
